﻿using System;

namespace diantou.web.ajax
{
    /// <summary>
    /// 比赛测试操作
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class contestJudge : userHandle<contestJudge>
    {
        /// <summary>
        /// 添加比赛测试
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        public void Append(diantou.dataAccess.contestJudge value, Action<fastCSharp.net.returnValue<int>> onReturn)
        {
            value.UserId = currentUser.Id;
            diantou.dataAccess.tcpCall.contestJudge.append(value, onReturn);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="problemId">验证问题标识</param>
        /// <param name="language"></param>
        /// <returns>程序内容</returns>
        [fastCSharp.code.cSharp.ajax(IsOnlyPost = false)]
        public string Get(int id, int problemId, out diantou.dataModel.judgeState.languageType language)
        {
            return diantou.dataAccess.tcpCall.contestJudge.getProgramContent(id, problemId, currentUser.Id, out language);
        }
    }
}
